<!--
 * @Descripttion: 
 * @version: v1.O.0
 * @Author: 薛玉峰
 * @Date: 2020-02-15 15:45:40
 * @LastEditors  : 薛玉峰
 * @LastEditTime : 2020-02-15 21:43:09
 -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta
			name="viewport"
			content="width=device-width, initial-scale=1, maximum-scale=1"
		/>
		<title><%= title %></title>
		<meta name="renderer" content="webkit" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta
			name="viewport"
			content="width=device-width, initial-scale=1, maximum-scale=1"
		/>
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="format-detection" content="telephone=no" />

		<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
		<style>
			.layui-form-item .text-value{
				line-height: 40px;
				color: #666;
			}
		</style>
	</head>
	<body>
		<form
			class="layui-form"
			action="/admin/add"
			method="post"
			style="margin-right: 35px;"
		>
			<div class="layui-form-item" style="margin-top: 30px;">
				<label class="layui-form-label">队列名称:</label>
				<div class="layui-input-block  text-value">
					<%= queue_name %>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">ES Index:</label>
				<div class="layui-input-block  text-value">
					<%= index_name %>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">淘汰策略:</label>
				<div class="layui-input-block  text-value">
					<% if(eliminate == 0){%>
						无
					<%} else if(eliminate == 1){%>
						按日期
					<%} else if(eliminate == 2){%>
						按数据量
					<%}%>
				</div>
			</div>
			<div class="layui-form-item" <% if(eliminate == 
				0){%>style="display: none;"<%}%>>
				<label class="layui-form-label">淘汰条件:</label>
				<div class="layui-input-block text-value">
					<%= eliminate_where %> 
					
					<% if(eliminate == 1){%>
						月
					<%} else if (eliminate == 2) { %>
						条
					<%}%>
				</div>
				
			</div>

			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">Mapping:</label>
				<div class="layui-input-block">
					<pre class="layui-code" lay-title="Json" lay-skin="notepad"><%= mapping %>
					</pre>
				</div>
			</div>
		</form>
		<script src="/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript">
			
			layui.use('code', function(){
  
				layui.code(); // 实际使用时，执行该方法即可。而此处注释是因为修饰器在别的js中已经执行过了
			});
		</script>
	</body>
</html>
